function [] = transformData( inputDataFolder, outputDataFolder )
%TRANSFORMDATA Summary of this function goes here
%   Detailed explanation goes here

lstAll = dir(inputDataFolder);
lstFileName = {};

for i = 1:length(lstAll)
    if (lstAll(i).isdir == 0 && ~strcmp(lstAll(i).name,'.directory'))
       lstFileName = [lstFileName; lstAll(i).name];
    end
end

numFile = length(lstFileName);

for i=1:numFile
    fullFileName = strcat(inputDataFolder, lstFileName(i));
    xyzrgbStruct = load(fullFileName{1});
    [path variableName ext] = fileparts(fullFileName{1});
    rgbImage = kinect2rgb(xyzrgbStruct.(variableName));
    xyzImage = kinect2xyz(xyzrgbStruct.(variableName));
    
    rgbxyzOutput = strcat(outputDataFolder, 'rgb_xyz_frame_',num2str(i,'%0.2d'),'.mat');
    save(rgbxyzOutput,'-mat', 'rgbImage', 'xyzImage');
    
    
end

end

